#include <iostream>
using namespace std;

const int N = 10;

int n,k;
int a[N][N];
string ret;

int main(){
	cin >> n >> k;
	for(int i = 1;i <= n;i++){
		for(int j = 1;j <= n;j++){
			cin >> a[i][j];
		}
	}
	int i = 1,j = 1;
	while(i <= n&&j <= n){
		if
	}
	return 0;
}
